<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateVisitorApprovalLogTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('visitor_approval_log', function (Blueprint $table) {
            $table->increments('id');
            $table->string('uniqueId')->nullable()->comment('uniqueId');
            $table->string('unionId')->nullable()->comment('unionId');
            $table->string('openid')->nullable()->comment('openid');
            $table->string('authorId')->nullable()->comment('authorId');
            $table->string('image_path')->nullable()->comment('图片路劲');
            $table->string('visitor_name')->nullable()->comment('访客姓名');
            $table->string('visitor_phone')->nullable()->comment('访客电话');
            $table->string('interviewee_name')->nullable()->comment('受访者姓名');
            $table->string('interviewee_phone')->nullable()->comment('受访者电话');
            $table->string('reason')->nullable()->comment('访问原因');
            $table->integer('author_status')->default('0')->comment('author_status');
            $table->integer('arrive_status')->default('0')->comment('arrive_status');
            $table->integer('verify_status')->default('0')->comment('verify_status');
            $table->integer('pass_type')->default('0')->comment('通行证类型');
            $table->integer('source')->default('0')->comment('访问区域');
            $table->string('start_time')->nullable()->comment('预约开始时间');
            $table->string('end_time')->nullable()->comment('预约结束时间');
            $table->string('created')->nullable()->comment('预约创建时间');
            $table->string('updated')->nullable()->comment('预约更新时间');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('visitor_approval_log');
    }
}
